package com.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;  
  
@RestController
@EnableAutoConfiguration  
@RequestMapping("/user")
public class UserController {  
  
    @RequestMapping("/{id}")  
    public User home(@PathVariable("id") int id) {  
    	User user=new User();
    	user.setId(id);
    	user.setName("test");
        return user;  
    }  
  
    public static void main(String[] args) throws Exception {  
        SpringApplication.run(UserController.class, args);  
    }  
}  
